<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>sock: E:/git/sock/sock/net/event_loop.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">sock
   &#160;<span id="projectnumber">v0.11</span>
   </div>
   <div id="projectbrief">C++ Network Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_99ede9081e3122cb31ab1bd7b142cd6c.html">sock</a></li><li class="navelem"><a class="el" href="dir_7c33e989e8c050d7b2ba91a16c41033d.html">sock</a></li><li class="navelem"><a class="el" href="dir_d903d5916af6fe48bd2085e947d1c878.html">net</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">event_loop.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="event__loop_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Name         : event_loop.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Author       : 671643387</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Date         : 2015年10月6日</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Description  :</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef SOCK_NET_EVENT_LOOP_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define SOCK_NET_EVENT_LOOP_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;boost/noncopyable.hpp&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;boost/function.hpp&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="mutex_8h.html">sock/base/mutex.h</a>&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="queue_8h.html">sock/base/queue.h</a>&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="time_8h.html">sock/base/time.h</a>&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="reactor_8h.html">sock/net/reactor.h</a>&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacesock.html">sock</a></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="keyword">namespace </span>net</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    {</div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html">   25</a></span>&#160;        <span class="keyword">class </span><a class="code" href="classsock_1_1net_1_1_event_loop.html">EventLoop</a> : <span class="keyword">public</span> boost::noncopyable</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88">   31</a></span>&#160;            <span class="keyword">enum</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88">State</a></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            {</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f">   33</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f">READY</a>,</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b">   34</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b">RUNNING</a>,</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312">   35</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312">EXITING</a>,</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641">   36</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641">EXIT</a></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            };</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_event_loop_1_1_statics.html">   42</a></span>&#160;            <span class="keyword">struct </span><a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html">Statics</a></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                <span class="comment">// 配置信息</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_event_loop_1_1_statics.html#a94992cfd254df87e9ceb4336cdb1bb0f">   45</a></span>&#160;                base::mtime_t <a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html#a94992cfd254df87e9ceb4336cdb1bb0f">frameTime</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                <span class="comment">// 状态信息</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_event_loop_1_1_statics.html#acf3a026823f22f3d1afaa13cedecb284">   48</a></span>&#160;                base::mtime_t <a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html#acf3a026823f22f3d1afaa13cedecb284">frameUseTime</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            };</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            <a class="code" href="classsock_1_1net_1_1_event_loop.html#a331c5606120916c4b979e09cdad08b68">EventLoop</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span> = -1);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <a class="code" href="classsock_1_1net_1_1_event_loop.html#a8b6e605d5352b92fa0d5b55682179162">~EventLoop</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a79368440ea6f81c4c2f2bfe31c1975fb">queue</a>(boost::function&lt;<span class="keywordtype">void</span>(<span class="keywordtype">void</span>)&gt; handler);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a2c3528af20401c5bcaa7c8ddfe831d2d">run</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a2115323b7b33ddab22e986c64c2741a8">stop</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#a4f46094758e91bfc921609f5c9c70100">   75</a></span>&#160;            <a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html">Statics</a> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a4f46094758e91bfc921609f5c9c70100">getStatics</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                <a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html">Statics</a> statics =  </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                    frameTime_,</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                    frameUseTime_</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                };</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                <span class="keywordflow">return</span> statics;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#a97b81fbb8899340ab54f8a6240964925">   88</a></span>&#160;            <span class="keywordtype">int</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a97b81fbb8899340ab54f8a6240964925">getId</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> id_; }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#a388a74d15d9d5d8b7b4cf52fb07678f6">   94</a></span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_event_loop.html#a388a74d15d9d5d8b7b4cf52fb07678f6">setFrameTime</a>(base::mtime_t time) { frameTime_ = time; }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_event_loop.html#a0f3092aa884148977206a30fc13d1385">  100</a></span>&#160;            <a class="code" href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">ReactorPtr</a>&amp; <a class="code" href="classsock_1_1net_1_1_event_loop.html#a0f3092aa884148977206a30fc13d1385">getReactor</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> reactor_; }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            <span class="keywordtype">void</span> setState(<a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88">State</a> state) { state_ = state; }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            <span class="keyword">struct </span>_stEvent</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;            {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                boost::function&lt;void(void)&gt; handler;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                base::mtime_t time;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            };</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keywordtype">int</span> id_;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            <a class="code" href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">ReactorPtr</a> reactor_;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            base::LockedQueue&lt;struct _stEvent, base::Mutex&gt; events_;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            base::mtime_t frameTime_;                    <span class="comment">/* 帧时间 */</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88">State</a> state_;                                <span class="comment">/* 状态 */</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            <span class="keyword">volatile</span> base::mtime_t frameUseTime_;        <span class="comment">/* 实际帧时间 */</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="keyword">class </span>Checker</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <span class="keyword">public</span>:</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                Checker(<a class="code" href="classsock_1_1net_1_1_event_loop.html#a331c5606120916c4b979e09cdad08b68">EventLoop</a>* loop) : loop_(loop), time_(base::Time::fromStartup()){}</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                <span class="keywordtype">bool</span> process(<span class="keyword">struct</span> _stEvent&amp; event)</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                    <span class="keywordflow">if</span> (loop_-&gt;state_ != <a class="code" href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312">EXITING</a>)</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                        <span class="keywordflow">return</span> (event.time &lt;= time_);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            <span class="keyword">private</span>:</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                <a class="code" href="classsock_1_1net_1_1_event_loop.html#a331c5606120916c4b979e09cdad08b68">EventLoop</a>* loop_;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                base::mtime_t time_;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            };</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        };</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;}</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SOCK_NET_EVENT_LOOP_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a97b81fbb8899340ab54f8a6240964925"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a97b81fbb8899340ab54f8a6240964925">sock::net::EventLoop::getId</a></div><div class="ttdeci">int getId(void) const </div><div class="ttdoc">获取循环ID </div><div class="ttdef"><b>Definition:</b> event_loop.h:88</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641">sock::net::EventLoop::EXIT</a></div><div class="ttdef"><b>Definition:</b> event_loop.h:36</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312">sock::net::EventLoop::EXITING</a></div><div class="ttdef"><b>Definition:</b> event_loop.h:35</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a2115323b7b33ddab22e986c64c2741a8"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a2115323b7b33ddab22e986c64c2741a8">sock::net::EventLoop::stop</a></div><div class="ttdeci">void stop(void)</div><div class="ttdoc">停止循环 </div><div class="ttdef"><b>Definition:</b> event_loop.cc:79</div></div>
<div class="ttc" id="time_8h_html"><div class="ttname"><a href="time_8h.html">time.h</a></div></div>
<div class="ttc" id="structsock_1_1net_1_1_event_loop_1_1_statics_html"><div class="ttname"><a href="structsock_1_1net_1_1_event_loop_1_1_statics.html">sock::net::EventLoop::Statics</a></div><div class="ttdoc">状态 </div><div class="ttdef"><b>Definition:</b> event_loop.h:42</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_ab28d6bf1c548153366f543d2609b1d88"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88">sock::net::EventLoop::State</a></div><div class="ttdeci">State</div><div class="ttdoc">状态 </div><div class="ttdef"><b>Definition:</b> event_loop.h:31</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f">sock::net::EventLoop::READY</a></div><div class="ttdef"><b>Definition:</b> event_loop.h:33</div></div>
<div class="ttc" id="structsock_1_1net_1_1_event_loop_1_1_statics_html_a94992cfd254df87e9ceb4336cdb1bb0f"><div class="ttname"><a href="structsock_1_1net_1_1_event_loop_1_1_statics.html#a94992cfd254df87e9ceb4336cdb1bb0f">sock::net::EventLoop::Statics::frameTime</a></div><div class="ttdeci">base::mtime_t frameTime</div><div class="ttdef"><b>Definition:</b> event_loop.h:45</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html">sock::net::EventLoop</a></div><div class="ttdoc">事件循环 </div><div class="ttdef"><b>Definition:</b> event_loop.h:25</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a8b6e605d5352b92fa0d5b55682179162"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a8b6e605d5352b92fa0d5b55682179162">sock::net::EventLoop::~EventLoop</a></div><div class="ttdeci">~EventLoop(void)</div><div class="ttdef"><b>Definition:</b> event_loop.cc:36</div></div>
<div class="ttc" id="queue_8h_html"><div class="ttname"><a href="queue_8h.html">queue.h</a></div></div>
<div class="ttc" id="reactor_8h_html"><div class="ttname"><a href="reactor_8h.html">reactor.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a331c5606120916c4b979e09cdad08b68"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a331c5606120916c4b979e09cdad08b68">sock::net::EventLoop::EventLoop</a></div><div class="ttdeci">EventLoop(int id=-1)</div><div class="ttdef"><b>Definition:</b> event_loop.cc:21</div></div>
<div class="ttc" id="namespacesock_html"><div class="ttname"><a href="namespacesock.html">sock</a></div><div class="ttdef"><b>Definition:</b> atomic.h:17</div></div>
<div class="ttc" id="mutex_8h_html"><div class="ttname"><a href="mutex_8h.html">mutex.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a388a74d15d9d5d8b7b4cf52fb07678f6"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a388a74d15d9d5d8b7b4cf52fb07678f6">sock::net::EventLoop::setFrameTime</a></div><div class="ttdeci">void setFrameTime(base::mtime_t time)</div><div class="ttdoc">设置帧时间 </div><div class="ttdef"><b>Definition:</b> event_loop.h:94</div></div>
<div class="ttc" id="namespacesock_1_1net_html_af8e0f3d2c4f0c2125945c1db54739b23"><div class="ttname"><a href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">sock::net::ReactorPtr</a></div><div class="ttdeci">boost::shared_ptr&lt; Reactor &gt; ReactorPtr</div><div class="ttdef"><b>Definition:</b> reactor.h:98</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b">sock::net::EventLoop::RUNNING</a></div><div class="ttdef"><b>Definition:</b> event_loop.h:34</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a2c3528af20401c5bcaa7c8ddfe831d2d"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a2c3528af20401c5bcaa7c8ddfe831d2d">sock::net::EventLoop::run</a></div><div class="ttdeci">void run(void)</div><div class="ttdoc">执行循环 </div><div class="ttdef"><b>Definition:</b> event_loop.cc:47</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a4f46094758e91bfc921609f5c9c70100"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a4f46094758e91bfc921609f5c9c70100">sock::net::EventLoop::getStatics</a></div><div class="ttdeci">Statics getStatics(void)</div><div class="ttdoc">获取循环状态 </div><div class="ttdef"><b>Definition:</b> event_loop.h:75</div></div>
<div class="ttc" id="structsock_1_1net_1_1_event_loop_1_1_statics_html_acf3a026823f22f3d1afaa13cedecb284"><div class="ttname"><a href="structsock_1_1net_1_1_event_loop_1_1_statics.html#acf3a026823f22f3d1afaa13cedecb284">sock::net::EventLoop::Statics::frameUseTime</a></div><div class="ttdeci">base::mtime_t frameUseTime</div><div class="ttdef"><b>Definition:</b> event_loop.h:48</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a0f3092aa884148977206a30fc13d1385"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a0f3092aa884148977206a30fc13d1385">sock::net::EventLoop::getReactor</a></div><div class="ttdeci">ReactorPtr &amp; getReactor(void)</div><div class="ttdoc">获取循环的网络反应器 </div><div class="ttdef"><b>Definition:</b> event_loop.h:100</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a79368440ea6f81c4c2f2bfe31c1975fb"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a79368440ea6f81c4c2f2bfe31c1975fb">sock::net::EventLoop::queue</a></div><div class="ttdeci">void queue(boost::function&lt; void(void)&gt; handler)</div><div class="ttdef"><b>Definition:</b> event_loop.cc:41</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
